<template>
  <el-date-picker style=" width: 100%;" v-model.trim="attribute.labelValue" type="datetimerange" :picker-options="pickerOptions" range-separator="至" :start-placeholder="attribute.placeholder[0]||'开始时间'" :end-placeholder="attribute.placeholder[1]||'结束时间'" :align="attribute.align||'left'">
  </el-date-picker>
</template>

<script>
import pickerOptions from "@/components/publicJs/utils/pickerOptions";
export default {
  name: "datetimerange",
  props: {
    attribute: {
      tyep: Object,
      default: () => {}
    }
  },
  watch: {
    "attribute.labelValue"() {
      if (!this.attribute.labelValue) {
        this.attribute.labelValue = [];
      }
    }
  },
  data() {
    return {
      pickerOptions: pickerOptions
    };
  }
};
</script>
